#include "CQueryWidget.h"
#include "ui_CQueryWidget.h"

namespace Ui {
	class CQueryWidgetClass;
}
Ui::CQueryWidgetClass ui;

CQueryWidget::CQueryWidget(QWidget *parent)
	: QWidget(parent)
{
	ui.setupUi(this);
	OnInitDialog();
}

CQueryWidget::~CQueryWidget()
{}

void CQueryWidget::OnInitDialog()
{
	this->setWindowFlags(Qt::FramelessWindowHint|Qt::MSWindowsFixedSizeDialogHint);
	connect(ui.pushButton_query, &QPushButton::clicked, this, &CQueryWidget::signal_query_clicked);
	connect(ui.checkBox, &QCheckBox::stateChanged, this, [this](int state) {
		bool flag{};
		if (Qt::Checked == state)
			flag = true;
		else
			flag = false;
		emit signal_checked(flag);
		});
}
